<?php

namespace app\common\service;

use app\common\service\Base;
use app\common\model\Like as LikeModel;

class Like extends Base {

     public function __construct() {
         parent::__construct();
         $this->currentModel = new LikeModel();
     }

    /**
     * 检查今天是否点过赞
     * @param $likeCustomerId
     * @param $mchCustomerId
     * @return array|null|\PDOStatement|string|\think\Model
     */
    public function checkTodayExistLike($likeCustomerId, $mchCustomerId) {

        $map['like_customer_id'] = $likeCustomerId;
        $map['mch_customer_id'] = $mchCustomerId;
        $map['create_date'] = date("Y-m-d");

        return $this->currentModel
            ->where($map)
            ->find();

    }


}